<template>
  <div>
    <h3>发送网络请求</h3>
    <hr>
    <button @click="sendWeb">发送网络请求</button>
  </div>
</template>
<script>
import axios from "axios";

export default {
  name:"App",
  methods: {
    sendWeb() {
      axios.get('http://localhost:8080/try/ajax/json_demo.json').then(
        response => {
          console.log('成功',response.data);
        },
        error => {
          console.log('失败',error);
        }
      )
    }
  },
}
</script>